import os.path

from common.readyaml import get_testcase_yaml
from base.apiutil import RequestBase


test_case_path = os.path.dirname(__file__)
case_dir_name = "SingleInterface"
case_file_name = "addUser.yaml"
case_file_path = os.path.join(test_case_path, case_dir_name, case_file_name)

data = get_testcase_yaml(case_file_path)
for temp in data:
    baseinfo, test_case = temp
    validation = test_case.get("validation")
    reload_data = RequestBase.replace_load(RequestBase, validation)
    print(reload_data, type(reload_data))